package gui.menu.file;

import dataExport.Exporter;
import org.pushingpixels.flamingo.api.common.icon.EmptyResizableIcon;
import org.pushingpixels.flamingo.api.ribbon.RibbonApplicationMenuEntryPrimary;
import org.pushingpixels.flamingo.api.ribbon.RibbonApplicationMenuEntrySecondary;

import javax.swing.*;
import java.util.List;

/**
 * User: Szymon Kudzia
 * Date: 30.04.13
 * Time: 14:56
 */
public class ConfigureExporters {
	List<Exporter> exporters;

	public ConfigureExporters(List<Exporter> exporters) {
		this.exporters = exporters;
	}

	public void addExporters(RibbonApplicationMenuEntryPrimary menu) {
		RibbonApplicationMenuEntrySecondary[] s = new RibbonApplicationMenuEntrySecondary[exporters.size()];

		for (int i = 0; i < exporters.size(); ++i) {
			s[i] = new ExporterItem(exporters.get(i));
		}

		menu.addSecondaryMenuGroup("Export", s);
	}
}
